package com.jsb.laundry.model.shops;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 运单详情
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ShopTransportOrderDetailVo implements Serializable {

    private static final long serialVersionUID = 701700696615489656L;

    private OrderInfo orderInfo;

    private UserInfo userInfo;

    private RiderInfo riderInfo;

    private ProductInfo productInfo;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class OrderInfo {
        @ApiModelProperty(value = "订单编号")
        private String orderId;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value = "下单时间")
        private Date paidAt;
        @ApiModelProperty(value = "订单类型")
        private String orderType;
        @ApiModelProperty(value = "订单金额")
        private String paidPrice;
        @ApiModelProperty(value = "衣物数量")
        private String num;
        @ApiModelProperty(value = "站点")
        private String shopName;
        @ApiModelProperty(value = "当前状态")
        private String currentStatus;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class UserInfo {
        @ApiModelProperty(value = "客户姓名")
        private String pickupName;
        @ApiModelProperty(value = "客户手机号")
        private String pickupMobile;
        @ApiModelProperty(value = "收衣地址")
        private String pickupAddress;
        @ApiModelProperty(value = "送衣地址")
        private String deliveryAddress;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class RiderInfo {
        @ApiModelProperty(value = "骑手姓名")
        private String riderName;

        @ApiModelProperty(value = "骑手手机号")
        private String riderPhone;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value = "骑手送达时间")
        private Date riderCreatedAt;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class ProductInfo {
        @ApiModelProperty(value = "名称")
        private String title;

        @ApiModelProperty(value = "品牌")
        private String brand;

        @ApiModelProperty(value = "颜色")
        private String color;


        @ApiModelProperty(value = "瑕疵")
        private String flaw;

        @ApiModelProperty(value = "服务")
        private String afterWashingEffect;

        @ApiModelProperty(value = "洗护方式")
        private String washingType;
    }

}
